StartSimulationEngine  "SimState/basicsim.xml"


AddDifferentialDriveEntity    base1


AddGraphicSpriteEntity    sprite1
	/Position:0  0.5  0
	/Orientation:0    180    0
	/Width:2
	/Height:2
	/TextureWidth:500
	/TextureHeight:500
	/ParentEntity:base1

SimpleDashboard  

FlushScript  


Random  rnd

linesPos = Util.CreateArray("int", 30, 2)

for (int i=0; i < 30; i++)
{
	for (int j=0; j < 2; j++)
	{
		linesPos.SetValue(rnd.Next(0, 500), i, j)		
	}	
}

for (int i2=0; i2 < 15; i2++)
{
	int ind1 = i2 * 2
	int ind2 = ind1 + 1

	int pos_x1 = linesPos.GetValue(ind1, 0)
	int pos_y1 = linesPos.GetValue(ind1, 1)

	int pos_x2 = linesPos.GetValue(ind2, 0)
	int pos_y2 = linesPos.GetValue(ind2, 1)
		
	sprite1.SpriteDrawLine(Util.ToString(ind1), "Blue", pos_x1, pos_y1, 3)
	sprite1.SpriteDrawLine(Util.ToString(ind1), "Blue", pos_x2, pos_y2, 3)

}